﻿package mortal.game.view.wizard.panel
{
    import flash.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.guide.*;
    import mortal.game.view.wizard.data.*;
    import mortal.mvc.core.*;

    public class WizardIcon extends HintBaseIcon
    {
        private static var _instance:WizardIcon;

        public function WizardIcon()
        {
            super(ImagesConst.SpriteTipIcon);
            if (_instance)
            {
                throw new Error("WizardIcon");
            }
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            GuideController.currentGuideItemWin = ModuleType.Wizard;
            var _loc_2:* = WizardUtil.canAdvancedWizardData;
            NetDispatcher.dispatchCmd(ServerCommand.WizardWinOpen, _loc_2 == null ? (1) : (_loc_2.tSprite.code));
            return;
        }// end function

        public static function get instance() : WizardIcon
        {
            if (!_instance)
            {
                _instance = new WizardIcon;
            }
            return _instance;
        }// end function

        public static function get isViewShow() : Boolean
        {
            return _instance && !_instance.isHide;
        }// end function

    }
}
